export default function define(Python: Blockly.BlockGenerators) {
  Python['websleepnew'] = function(block) {
    var value_name = Blockly.Python.valueToCode(block, 'sleep', Blockly.Python.ORDER_ATOMIC);
    // TODO: Assemble Python into code variable.
    var code = 'time.sleep(' +value_name+ ')\n';
    return code;
  };

  Python['webprintnew'] = function (block) {
    var text_print = Blockly.Python.valueToCode(block, 'text', Blockly.Python.ORDER_ATOMIC);
    // TODO: Assemble Python into code variable.
    const code = 'print("' + text_print + '")\n';
    return code;
  };

  Python['global'] = function (block) {
    var text_print = Blockly.Python.valueToCode(block, 'text', Blockly.Python.ORDER_ATOMIC);
    // TODO: Assemble Python into code variable.
    const code = 'global ' + text_print + '\n';
    return code;
  };

  Python['webstr'] = function (block) {
    var value_bool = Blockly.Python.valueToCode(block, 'bool', Blockly.Python.ORDER_ATOMIC);
    const code = 'str(' +  value_bool + ')';
    return [code, Blockly.Python.ORDER_ATOMIC];
  };
  
  Python['webint'] = function (block) {
    var value_str = Blockly.Python.valueToCode(block, 'str', Blockly.Python.ORDER_ATOMIC);
    const code = 'int(' +  value_str + ')';
    return [code, Blockly.Python.ORDER_ATOMIC];
  };

  Python['input_web'] = function(block) {
    var value_name = Blockly.Python.valueToCode(block, 'NAME', Blockly.Python.ORDER_ATOMIC) ;
    // TODO: Assemble Python into code variable.
    var code = 'input(' +value_name+ ' "\\n") ';
    // TODO: Change ORDER_NONE to the correct strength.
    return [code, Blockly.Python.ORDER_ATOMIC];
  };

}
